Packages are encapsulated collections of related procedures, stored functions, and other program objects stored together in the database. An package consists of two parts: a specification and a body. In the main window, click
Others ->
Package to open the package object list.
Package Designer and Package Body Designer are the basic Navicat tools for working with packages. After saving the package in Package Designer, you can edit its package body by clicking
.
Likewise, you can edit its package specification by clicking
in Package Body Designer.
You can enter a valid SQL statement in the Definition tab. To customize the view of the editor and find out more features for SQL editing, see SQL Editor for details.
The Code Outline pane displays information about the package/package body including function, procedure, parameter, code body, etc. If the Code Outline pane is hidden, choose View -> Code Outline.
Note: Available only in Non-Essentials Edition.
Button |
Description |
|
Refresh the code outline. |
|
Turn mouse over highlight on or off. |
|
Show the detail view of the code outline. |
|
Toggle sorting by position. |
|
Expand the selected item. |
|
Collapse the selected item. |
To execute the package, click
on the toolbar. If the SQL statement is correct, the statement will be executed and, if the statement is supposed to return data, the DBMS Output tab opens with the data returned. If an error occurs while executing the package, execution stops, the appropriate error message is displayed. If the package requires input parameters, the Input Parameters dialog will pop up.
You can add/remove breakpoints for debugging by clicking
in the grey area beside each statement.
Click
on the toolbar to launch the Oracle Debugger. Enter the input parameters if necessary.